home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Adobe Graphics & Publishing SDK 1996 December
/
Adobe Graphics & Publishing SDK 1996 December.iso
/
pc
/
pm65sdk
/
sourcecode
/
includes
/
pmutils.h
< prev
next >
Wrap
C/C++ Source or Header
|
1996-11-18
|
3KB
|
75 lines
/*
*--- PageMakerUtils.h -----------------------------------------------
* Copyright (c) 1995 Adobe Systems, Inc. All rights reserved.
*
* Utility routines for making callbacks. These were previously
* implemented as macros, but have been converted into functions
* to provide smaller footprint and compile time type-checking.
*
* $Revision: 1.2 $
*
*
*--------------------------------------------------------------------
*/
#ifndef __PageMakerUtils__
#define __PageMakerUtils__
#include <string.h>
#include "PMTypes.h"
#include "PMCommands.h"
#include "PMQueries.h"
#ifdef __cplusplus
extern "C" {
#endif
PMErr PBBinCommand(sPMParamBlockPtr thePB, ePMCommand op, ePMRefStyle theStyle, void * theRequest, unsigned long theRequestSize);
PMErr PBBinCommandByShortValue(sPMParamBlockPtr thePB, ePMCommand op, unsigned short v);
PMErr PBBinCommandByLongValue(sPMParamBlockPtr thePB, ePMCommand op, unsigned long v);
PMErr PBTextCommand(sPMParamBlockPtr thePB, ePMRefStyle theStyle, char * theText);
PMErr PBBinQuery(sPMParamBlockPtr thePB, ePMQuery op, ePMRefStyle rsy, void * r, unsigned long rsz);
PMErr PBBinQueryWithParms(sPMParamBlockPtr thePB, ePMQuery op,
ePMRefStyle theRequestStyle, void * theRequestData, unsigned long theRequestSize,
ePMRefStyle theReplyStyle, void * theReplyData, unsigned long theReplySize);
PMErr PBTextQuery(sPMParamBlockPtr thePB, char * theText, ePMRefStyle theStyle, char * theReplyBuf, unsigned long replyLen, ePMRefStyle theReplyStyle);
// These functions get or store a C string into a buffer, adjusting
// to insure that the buffer always starts on a two-byte boundary.
size_t LPGetString(char * pDst, const void * pSrc, short len);
size_t LPPutString(void * pDst, const char * pSrc);
size_t LPGetBuffer(char * pDst, const void * pSrc, short len);
size_t LPPutBuffer(void * pDst, const char * pSrc, short maxlen);
size_t LPPutShort(void * pDst, short pSrc);
size_t LPGetShort(short * pDst, const void * pSrc);
size_t LPPutLong(void * pDst, long pSrc);
size_t LPGetLong(long * pDst, const void * pSrc);
size_t LPPutULong(void * pDst, unsigned long pSrc);
size_t LPGetULong(unsigned long * pDst, const void * pSrc);
size_t LPPutHandle(void * pDst, PMHandle pSrc);
size_t LPGetHandle(PMHandle * pDst, const void * pSrc);
void BuildErrorMessages(sPMParamBlockPtr thePB, char * errText, char * cantText);
#ifdef WIN32
extern PMHandle hDllInstance;
#endif //WINDOWS
#ifdef __cplusplus
}
#endif
#endif
// end of PageMakerUtils.h